package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.BusModelParts;
import org.apache.ibatis.annotations.*;

import java.util.List;


/**
* @author apep
* @description 针对表【bus_model_parts】的数据库操作Mapper
* @createDate 2024-03-27 16:55:24
* @Entity com.ruoyi.system.domain.BusModelParts
*/
public interface BusModelPartsMapper {

    @Insert("insert into bus_model_parts(bus_model,parts_code) values(#{busModel},#{partsCode})")
    public int insertBusModelByPartsCode(@Param("busModel")String busModel,@Param("partsCode")String partsCode);

    @Select("select bus_model from bus_model_parts where parts_code = #{partsCode}")
    public List<String> getBusModelByPartsCode(@Param("partsCode")String partsCode);

    @Update("update bus_model_parts set bus_model = #{busModel} where parts_code = #{partsCode} ")
    public int updateBusModelByArray(@Param("busModel")String busModel,@Param("partsCode")String partsCode);

    @Delete("delete from  bus_model_parts where  parts_code = #{partsCode}")
    public int deleteModelByArray(@Param("partsCode")String partsCode);

    @Delete("insert into  bus_model_parts(bus_model,parts_code ) values(#{busModel},#{partsCode})")
    public int insertModelByArray(@Param("busModel")String busModel,@Param("partsCode")String partsCode);

}
